package com.yzg.sign.project.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


@Entity
@Data
@Table(name = "upload")
@EntityListeners(AuditingEntityListener.class)
public class Upload implements Serializable
{

    @Id
    @ApiModelProperty(name = "主键ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long Id;

    @Column(columnDefinition = "VARCHAR(255) COMMENT '文件原名称'")
    private String originName;

    @Column(columnDefinition = "VARCHAR(255) COMMENT '文件类别'")
    private String type;

    @Column(columnDefinition = "VARCHAR(255) COMMENT '文件路径'")
    private String  path;

    @Column(columnDefinition = "VARCHAR(255) COMMENT '后缀'")
    private String  suffix;

    @Column(columnDefinition = "VARCHAR(50) COMMENT '关联主键id'")
    private String relativeId;


    @Column(columnDefinition = "VARCHAR(1000) COMMENT '内容'")
    private String content;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @CreatedDate
    private Date createTime;




}
